Skip to content

clone: rename -p/--path flag to --working-dir - #333

Merged
micprog merged 3 commits into
masterfrom
align-clone-snapshot-workdir-flag
Aug 4, 2026
Merged

clone: rename -p/--path flag to --working-dir#333
micprog merged 3 commits into
masterfrom
align-clone-snapshot-workdir-flag

Conversation

@colluca

@colluca colluca commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • bender clone used -p/--path and bender snapshot used --working-dir for the same working-directory concept (same default value working_dir, same semantics). --working-dir is now the primary, documented flag for clone too, matching snapshot.
  • -p/--path are kept as fully-working hidden aliases on clone for backwards compatibility — neither appears in --help, but both still parse.
  • Updated the docs/book references and added a CHANGELOG entry.

Not a breaking change: existing -p/--path usage keeps working.

Test plan

  • cargo check --no-default-features passes
  • bender clone --help shows only --working-dir <WORKING_DIR> (no -p/--path)
  • bender clone -p <dir> <pkg> and bender clone --path <dir> <pkg> still parse correctly
  • bender snapshot --help shows --working-dir <WORKING_DIR> (unchanged)

@fischeti fischeti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks @colluca

colluca added 3 commits August 4, 2026 14:43
Align bender clone's flag with bender snapshot's --working-dir, since
both refer to the same working-directory concept (and share the same
default value). --path was also easy to confuse with the unrelated
`bender path` subcommand and path-dependency overrides.
Restores backwards compatibility for scripts using bender clone
-p/--path after the previous rename to --working-dir.
-p was still showing in help alongside --working-dir; use short_alias
instead of short so it stays functional but hidden, consistent with
the hidden --path long alias.
@micprog
micprog force-pushed the align-clone-snapshot-workdir-flag branch from 152efc3 to ada8709 Compare August 4, 2026 12:43

@micprog micprog left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! 👍

@micprog
micprog merged commit 74e46ce into master Aug 4, 2026
18 checks passed
@micprog
micprog deleted the align-clone-snapshot-workdir-flag branch August 4, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants